package com.mifengkong.cygtools.jjcard;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

/**
 * Created by jack on 17/2/23
 */

public class BaseResponseForCard<T> implements Serializable {

    private static final int SUCCESS_CODE = 0;

    private static final int FAILURE_CODE = 1;

    @SerializedName("code")
    private int code;

    @SerializedName("data")
    private T data;

    @SerializedName("message")
    private String message;


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isCodeSuccess() {
        return code == SUCCESS_CODE;
    }

}